Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy ahb without CPU read mask v2 #2042

Open
wants to merge 16 commits into
base: dev
Choose a base branch
from

Conversation

antonio-lunarg
Copy link
Contributor

@antonio-lunarg antonio-lunarg commented Feb 24, 2025

This is built on top of Ziga's #1812

Key changes:

  • encode: copy AHB by Ycbcr sampling Vulkan image, then stores RGBA8 (no legal way to copy original external formatted data).
  • decode: fills memory for the AHB by copying data to Vulkan image via ResourceInitializer. It also gets rid of references to the original external format as it is now expected to be RGBA8.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 379392.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6145 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6145 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380043.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6153 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380084.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6154 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380106.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6155 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6155 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380217.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6157 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6157 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380436.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6158 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 380468.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6159 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6159 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 381311.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6182 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6182 failed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6210 failed.

ziga-lunarg and others added 3 commits March 3, 2025 15:55
Device utilities check for features and properties using
vkGetPhysicalDeviceProperties2 which is available from Vulkan version
1.1 or its KHR version by enabling the corresponding extension.

Make sure to enable this extension when API version is < 1.1 and only
call vkGetPhysicalDeviceProperties2KHR if it was available and enabled.
Non-CPU readable AHB memory can not be copied, but it can be sampled
with a Ycbcr sampler. If available, enable the corresponding feature is
enabled for capture.
@antonio-lunarg antonio-lunarg force-pushed the antonio-ahb-copy-image branch from 6bc3218 to d77f380 Compare March 3, 2025 14:57
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 384857.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 384860.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6239 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6239 failed.

Import non-CPU readable Android Hardware Buffers with a VkImage. Use a
Ycbcr conversion sampler to get data from external unknown format to
RGBA8. Finally, read the data from GPU to host for a FillImageMemory
command.
Importing external memory with external format is not supported at
replay time. The capture stored data in RGBA8_UNORM.
The content of the Android Hardware Buffer is restored with a Vulkan
image which imports the AHB memory, then it's filled reusing
functionalities of the resource initializer.
Finally, both image views and samplers are patched to remove any
reference to Android hardware buffers and external memory formats.
Instead of modifying the sampler, patch the conversion so that it works
with RGBA8 formatted data.
@antonio-lunarg antonio-lunarg force-pushed the antonio-ahb-copy-image branch from 560d720 to 127f835 Compare March 4, 2025 15:38
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 385951.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6244 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6244 failed.

Do not query memory requirements before binding external memory to image.
VUID-VkMemoryDedicatedAllocateInfo-image-02964

If image is not VK_NULL_HANDLE and the memory is not an imported AHB or
an imported QNX Screen buffer, VkMemoryAllocateInfo::allocationSize must
equal the VkMemoryRequirements::size of the image.
VUID-VkMemoryDedicatedAllocateInfo-image-02964

If image is not VK_NULL_HANDLE and the memory is not an imported AHB or
an imported QNX Screen buffer, VkMemoryAllocateInfo::allocationSize must
equal the VkMemoryRequirements::size of the image.
If memory is importing an Android Hardware Buffer, its allocation size
should be equal to the AHB properties allocation size.
Do not write the state of image memory backed by an AHB as the AHB has
already been processed. At replay time the content of the image will
clearly correspond to the content of the AHB.
@antonio-lunarg antonio-lunarg force-pushed the antonio-ahb-copy-image branch from 127f835 to bbd750e Compare March 4, 2025 16:53
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 386143.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6247 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6247 failed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants